if(!finished && rectOverlap(
    oPlayer.x,oPlayer.y+oPlayer.dy,
    oPlayer.x+oPlayer.sprite_width, oPlayer.y+oPlayer.sprite_height+oPlayer.dy,
    x,view_yview,x+sprite_width,view_yview+view_hview
)){
    finished=true;
    if(levelIndex==levelReached)
        levelReached++;
    if(score>highestScore[levelIndex-1])
        highestScore[levelIndex-1]=score;
}

